package com.itheima.sys.client;


import com.itheima.common.vo.Result;
import com.itheima.sys.dto.CompanyUserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "sys-service", contextId = "companyUser")
public interface CompanyUserClient {

    /**
     * 根据员工ID跟企业ID查询员工信息
     * @param companyUserId 员工ID
     * @return
     */
    @GetMapping("/companyUser/queryone")
    public Result<CompanyUserDTO> queryCompanyUserOne(@RequestParam(value = "id") Long companyUserId);


    /**
     * 根据员工ID集合查询员工集合
     * @param companyUserIds
     * @return
     */
    @GetMapping("/companyUser/queryByIds")
    public Result<List<CompanyUserDTO>> queryCompanyUserByIds(@RequestParam("ids") List<Long> companyUserIds);


    /**
     * 查询当前企业下包含所有员工
     * @return
     */
    @GetMapping("/companyUser/list")
    public Result<List<CompanyUserDTO>> queryCurrentAllQuery();
}
